<template>
  <div>
    <MyNavBar ref="myNavBar"></MyNavBar>
    <div class="container">
      <div class="container-subject">
        <MyUserCenterContainer @refreshNavBar="refreshNavBar"></MyUserCenterContainer>
      </div>
    </div>
    <br>
    <MyFooter></MyFooter>
  </div>
</template>

<script>
import MyNavBar from "@/components/MyNavBar.vue";
import MyFooter from "@/components/MyFooter.vue";
import MyUserCenterContainer from "@/components/MyUserCenterContainer.vue";

export default {
  name: "UsersCenterView",
  components: {
    MyNavBar,
    MyUserCenterContainer,
    MyFooter
  },
  data() {
    return{

    }
  },
  mounted() {

  },
  created() {
    /*
    isLogin().then(resp => {
      if(resp.data.code !==200){
        //怎么办呢？
        window.location.href='/login'
      }
    })*/


  },
  methods:{
    refreshNavBar(){
      this.$refs.myNavBar.refreshLoginSuccessUserAvatar();
    }
  }

}
</script>

<style scoped>
.container {
  width: 100%;
  height: auto;
  background-color: #fafafa;
  padding: 10px 0px 20px 0px;
  margin: 0px 0px 10px 0px;
}

.container-subject {
  width: 80%;
  height: auto;
  background-color: #fafafa;
  margin: 40px auto;

}

.container-search {
  width: 80%;
  height: 40px;
  margin: 0px auto;
  text-align: center;
  padding: 0px;
}
</style>